#判断是否为素数
import math

def judge_pri(n):
  for i in (2, int(math.sqrt(n))):     # 平方
    if n > 2 and n % i == 0 or n == 1:
      return False
    else:
      return True

if __name__ == '__main__':
  # 输入一个数
  while(True):
    n = int(input("输入一个正整数："))
    judge_pri(n)
    if judge_pri(n):
      print(f"{n}是素数")
    else:
      print(f"{n}不是素数")


